package com.hoshiicloud.saleorder.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 金币流水
 * </p>
 *
 * @author zhangshuhu
 * @since 2019-06-03
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("coin_list")
public class CoinList implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableField("id")
    private Long id;

    /**
     * 子订单ID
     */
    @TableField("sub_id")
    private Long subId;

    /**
     * 支付流水号
     */
    @TableField("pay_order_no")
    private String payOrderNo;

    /**
     * 1-消费 2-退款
     */
    @TableField("pay_type")
    private Integer payType;

    /**
     * 支付日期时间
     */
    @TableField("pay_time")
    private LocalDateTime payTime;

    /**
     * 金币数
     */
    @TableField("pay_amount")
    private BigDecimal payAmount;

    /**
     * 等额人民币
     */
    @TableField("amount")
    private BigDecimal amount;

    /**
     * 0-未付款 1-已付款 -1 建议异常
     */
    @TableField("status")
    private Integer status;

    /**
     * 关联单号（销售主单/退款单号
     */
    @TableField("ref_no")
    private String refNo;

    /**
     * 删除标识
     */
    @TableField("deleted")
    private Integer deleted;

    /**
     * 提交时间
     */
    @TableField("created_time")
    private LocalDateTime createdTime;

    /**
     * 制单人
     */
    @TableField("created_by")
    private String createdBy;

    /**
     * 更新时间
     */
    @TableField("updated_time")
    private LocalDateTime updatedTime;

    /**
     * 更新人
     */
    @TableField("updated_by")
    private String updatedBy;

}
